package com.lagou.task1;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class Task1Mapper extends Mapper<LongWritable, Text,Task1BaseSort, NullWritable> {
    @Override
    protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Task1BaseSort, NullWritable>.Context context) throws IOException, InterruptedException {
        //传进来只有一个数字 直接传到 Task1BaseSort
        Task1BaseSort k = new Task1BaseSort(Long.parseLong(value.toString()));
        context.write(k,NullWritable.get());
    }
}
